#include "ctrackerwindow.h"

#include <buola/app/ccmdline.h>
#include <buola/gui/csimpleapp.h>
#include <buola/io/curi.h>
#include <buola/gui/ctoolkit.h>
#include <buola/image/cgc.h>
#include <buola/algorithm/range.h>

int main(int pNArgs,char **pArgs)
{
    using namespace buola;

    buola_init(pNArgs,pArgs);

    try
    {
        gui::get_toolkit()->GetOpenGLGC()->MakeCurrent();
        io::CURI lFolder;
        if(cmd_line().ArgCount()==1)
        {
            gui::CSimpleApp<tracker::CTrackerWindow> lApp(buola::io::arg(0));
            lApp.Run();
        }
        else
        {
            throw XArgument("wrong number of arguments... specify basename");
        }
    }
    catch(std::exception &pE)
    {
        msg_error() << pE.what() << "\n";
    }

    return buola_finish();
}

